package com.github.wujichen158.andemusic.playernbt;

import com.github.wujichen158.andemusic.aboutconfig.AndeMusicConfig;
import net.minecraft.nbt.NBTTagCompound;

import javax.annotation.Nonnull;

public class MusicCapability implements IMusicCapability {
    public static String musicType = "";
    public static int minDelayTime = AndeMusicConfig.minWaitTime;
    public static int maxDelayTime = AndeMusicConfig.maxWaitTime;

    @Override
    public NBTTagCompound saveNBTData() {
        return (NBTTagCompound) MusicTypeStorage.INSTANCE.writeNBT(MusicTypeProvider.CAP, this, null);
    }

    @Override
    public void loadNBTData(NBTTagCompound compound) {
        MusicTypeStorage.INSTANCE.readNBT(MusicTypeProvider.CAP, this, null, compound);
    }

    @Nonnull
    @Override
    public String getMusicType() {
        return musicType;
    }

    @Override
    public void setMusicType(String musicType2) {
        musicType = musicType2;
    }

    @Override
    public int getMinDelayTime() {
        return minDelayTime;
    }

    @Override
    public void setMinDelayTime(int minDelayTime2) {
        minDelayTime = minDelayTime2;
    }

    @Override
    public int getMaxDelayTime() {
        return maxDelayTime;
    }

    @Override
    public void setMaxDelayTime(int maxDelayTime2) {
        maxDelayTime = maxDelayTime2;
    }

}
